<?php

/**
 * 
 * @author yuxun
 *
 */
class RecordService extends Service {
	

	public static function getVerInfo($channel,$packet){
		if($channel == ''){
			$json_arr = array('errcode'=>-1,'msg'=>'need to parameter channel','data'=>'');
			return $json_arr;
		}

		$modVersionRecord = new ModVersionRecord();
		$list_obj = $modVersionRecord->findByAttributes(array('channel' => $channel));
		if(!$list_obj){  //不存在记录
			$json_arr = array('errcode'=>0,'msg'=>'记录不存在','data'=>'');
		}else{
			$data = array();
			$data['channel'] = $list_obj->channel;
			$data['user_protocol'] = $list_obj->user_protocol;
			$data['display'] = $list_obj->display;
			$data['display_icon'] = $list_obj->display_icon;
			$data['record_num'] = $list_obj->record_num;
			$data['record_link'] = $list_obj->record_link;
			$json_arr = array('errcode'=>1,'msg'=>'查询成功','data'=>$data);
		}
		return $json_arr;
	}
	
	

}